0d222b14a156f9ec60c137b83ef3cc7e78c90133,plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/element/SspClient.java,SspClient,updateTenantVifBinding,#String#String#,215

Before Change



        HttpPut method = new HttpPut();
        method.setEntity(new StringEntity(new Gson().toJson(req), ContentType.APPLICATION_JSON));
        HttpResponse res = executeMethod(method, "/ssp.v1/tenant-ports/" + portUuid);
        if (res == null || res.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
            return null;
        }
        try {
            return new Gson().fromJson(new InputStreamReader(res.getEntity().getContent(), "UTF-8"),
                    TenantPort.class);
        } catch (JsonSyntaxException e) {
            s_logger.error("reading response body failed", e);
        } catch (JsonIOException e) {
            s_logger.error("reading response body failed", e);
        } catch (IllegalStateException e) {
            s_logger.error("reading response body failed", e);
        } catch (IOException e) {
            s_logger.error("reading response body failed", e);
        }
        return null;
    }
}

After Change



        HttpPut method = new HttpPut();
        method.setEntity(new StringEntity(new Gson().toJson(req), ContentType.APPLICATION_JSON));
        return new Gson().fromJson(
                executeMethod(method, "/ssp.v1/tenant-ports/" + portUuid),
                TenantPort.class);
    }
}